import pymysql

class A3mall_db():
    def __init__(self,host,user,pwd,database):
        self.con = pymysql.connect(host=host,user=user,password=pwd,database=database)
        self.cur = self.con.cursor()

    def select_sql(self,sql):
        self.cur.execute(sql)
        return self.cur.fetchall()

    def close(self):
        self.cur.close()
        self.con.close()